//
//  UIBarButtonItem+Extension.swift
//  LiveShow
//
//  Created by dai zhong on 2017/4/26.
//  Copyright © 2017年 company.cn. All rights reserved.
//

import UIKit

extension UIBarButtonItem{

    convenience init(target :AnyObject? ,action:Selector ,norImg:UIImage ,selectedImg:UIImage) {
        
        let btn = UIButton(type: UIButtonType.custom);
        btn.setImage(norImg, for: UIControlState.normal);
        btn.setImage(selectedImg, for: UIControlState.selected);
        btn.addTarget(target, action: action, for: UIControlEvents.touchUpInside);
        
        self.init(customView:btn);
    }
}
